Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmadm boot fails "Cannot find disk" #53

Closed
MerlinDMC opened this issue Jan 29, 2012 · 7 comments
Closed

vmadm boot fails "Cannot find disk" #53

MerlinDMC opened this issue Jan 29, 2012 · 7 comments
Assignees

Comments

@MerlinDMC
Copy link
Contributor

[root@14-da-e9-ed-e1-8b /]# vmadm boot eb0a6d55-42cb-4e10-9d5f-3fa9361503c5 order=cd,once=d cdrom=/boot.iso,ide
Unable to start VM eb0a6d55-42cb-4e10-9d5f-3fa9361503c5: Cannot find disk: /boot.iso

boot.iso is located at /zones/eb0a6d55-42cb-4e10-9d5f-3fa9361503c5/root/boot.iso

Seems to be broken since the last release.

A first look into the code introduced a new vmobj.zoneroot that seems to be never initialized with any value.

@joshwilsdon
Copy link
Contributor

Daniel, can you confirm that this works if you change vmobj.zoneroot to vmobj.zonepath in /usr/vm/node_modules/VM.js? Sorry about that, I'll fix in our branch and talk to John tomorrow about whether we can get a new release built.

@MerlinDMC
Copy link
Contributor Author

currently i can't compile SmartOS will try tomorrow if noone else goes for it

but i think it should be vmobj.zonepath + "/root" or just working_dir

@joshwilsdon
Copy link
Contributor

You should be able to test without rebuilding by doing:

cp /usr/vm/node_modules/VM.js /var/tmp/VM.js
chmod 755 /var/tmp/VM.js
mount -F lofs /var/tmp/VM.js /usr/vm/node_modules/VM.js

and then editing the file.

@joshwilsdon
Copy link
Contributor

You are correct (I just confirmed) the fix is to change to:

if (!found && path.existsSync(vmobj.zonepath + '/root/' + disk.path)) {

I've tested this here and committed to our internal repo. I'll ask tomorrow if we can get that bit pushed upstream asap.

@jclulow
Copy link
Contributor

jclulow commented Jan 30, 2012

I think it's probably better to use path.join, thus:

if (!found && path.existsSync(path.join(vmobj.zonepath, 'root', disk.path))) {

@ghost ghost assigned joshwilsdon Jan 30, 2012
@joshwilsdon
Copy link
Contributor

Good call. I've done it with path.join now. Thanks!

@JohnSonnenschein
Copy link
Contributor

Pushed to smartos-live. I'll rebuild another iso/usbkey since this is a pretty major bug (makes it hard to provision vms without it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants