Problem adding new vDisk to existing VM


Recommended Posts

I tried adding a new vDisk to an existing VM two different ways:

After using virtManager, the OS wouldn't load.

So I reset and tried an XML edit. But following error prevents me from saving the XML:

VM creation error

unsupported configuration: per-device boot elements cannot be used together with os/boot elements

 

Anyone able to clue me in on what's going on? Why does this work:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/notmacOS/vdisk2.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

but this gives the error:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/notmacOS/vdisk2.img'/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/_vDisks/notmacOS_scratchDisk.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

I used the standard template manager GUI to add a vDisk, which generated the the second XML. Couldn't be more easy. So why the error and how to fix. Or is there a better way of adding the second vDisk?

Link to comment

Googling the error seems to be the direction needed for this one, there are quite a few answers for that...

 

Using the form view of the UnRaid VM editor is probably likely the best method of fixing this issue... And if not, create a "New" VM, but point it to the old image files it needs, then add the drive there...  Some minor manual editing would be needed after that...  Make sure to do backups...

Link to comment

After many, MANY, diffcompare I narrowed the offending XML which led me to @SpaceInvaderOne explanation HERE.

 

Essentially I was using both a boot device selector earlier in my XML:

<boot dev='hd'/>

and boot ordering in the disk attachment:

<boot order='1'/>

Only one is usable at a time. I chose the latter. Easier to understand when I inevitably change something in the future.

  • Like 3
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.