[SOLVED] VM running off of single, dedicated disk...


rmp5s

Recommended Posts

I tried this method from the one post... 

<disk type='block' device='disk'>      
<driver name='qemu' type='raw' cache='writeback'/>       
<source dev='/dev/sda'/>       
<target dev='hdd' bus='sata'/>     
</disk>

...and it took it, but when it boots, it's not seeing the drive...windoze isn't booting.  I'm still messing with it.  

Link to comment

So, to go from a vdisk to a physical disk (v to p, as it were), first you must dd (copy) your vdisk to the physical disk:

 

dd if="location/of/vdisk" of=/dev/sdX

Details can be found in this video.  My command was...

 

dd if='/mnt/user/domains/Adobe/vdisk1.img' of=/dev/sde

 

**EDIT:  Thank you, John_M!!**

 

When that's done, open up the terminal (top right corner under your server stats) and run...

ls -l /dev/disk/by-id

...to get all your disk associations.  This is what I was trying to do earlier but, without the "-l" flag, it just comes out as a bunch of random nonsense.  With the flag, it shows which ID is tied to which device.  

 

So, you run that command and you get something like this:


image.thumb.png.7d7c655c064fc273e904f5a9e43fba8a.png

 

We know that the drive that we want is SDE from the "Main" tab:


image.thumb.png.4b95fcf34bd92f2ccc554b656a1d3d9e.png
 

That means we can use either scsi-35002538e40d01f52 or wwn-0x5002538e40d01f52 to tell the VM which disk to use.  So, go edit the VM and hand jam either \dev\disk\by-id\scsi-35002538e40d01f52 or \dev\disk\by-id\wwn-0x5002538e40d01f52 into the disk location:
 

image.thumb.png.2c4222539836e4015fce9242721ca0b8.png

 

...and boom...Bob's your auntie.

 

It's that easy.  Seriously.  

 

Thank you again, everyone.  YOU ROCK!!

Edited by rmp5s
Link to comment
  • rmp5s changed the title to [SOLVED] VM running off of single, dedicated disk...
1 hour ago, rmp5s said:

So, to go from a vdisk to a physical disk (v to p, as it were), first you must dd (copy) your vdisk to the physical disk:

 


dd if="location/of/vdisk" of=/dev/sdX

Details can be found in this video.

 

Then you simply point the VM to the new disk.  Look on your "Main" page and find the disk you copied the vdisk to.  In my case it's sde:

 

image.thumb.png.69eb9ae3d09aed3ffc696b94490a93ae.png

 

Then you edit the VM, change vdisk to "manual" and set the location to /dev/YOURDISK:

 

image.png.3abf0990f5248a6247c92ef32489d97a.png

 

It's that easy.  Seriously.  

 

Thank you again, everyone.  YOU ROCK!!

Not good to use sdx because on reboots drive letters can change, should use drives unique ID that does not change.

Link to comment
6 minutes ago, jpowell8672 said:

Not good to use sdx because on reboots drive letters can change, should use drives unique ID that does not change.

Yes. I know. But, after spending HOURS trying to get the drive ID method working, I'm STOKED to just have it working.

 

If you'd like to look at my previous posts and see if you could figure out the correct drive ID, have at it.

Link to comment
15 hours ago, rmp5s said:

Yes. I know. But, after spending HOURS trying to get the drive ID method working, I'm STOKED to just have it working.

 

If you'd like to look at my previous posts and see if you could figure out the correct drive ID, have at it.

If you type

ls -l /dev/disk/by-id

you will see what the symlinks actually point to. Instead of using /dev/sdX in your configuration, use /dev/disk/by-id/Y where Y is the symlink (shown in light blue/cyan) that points to your /dev/sdX. If what I wrote doesn't make sense then post a screenshot of the ls -l command, above and confirm which sdX you are currently using (from your screenshot above it looks like you're using /dev/sde).

  • Like 1
Link to comment

Here's what I get when I type the command above:

root@Mandaue:~# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D9584LHA -> ../../sde
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D9584LHA-part1 -> ../../sde1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D9584PUZ -> ../../sdk
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D9584PUZ-part1 -> ../../sdk1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D95HZ0ZF -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D95HZ0ZF-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D95HZARZ -> ../../sdi
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D95HZARZ-part1 -> ../../sdi1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX41D758N0YV -> ../../sdf
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68L0BN1_WD-WX41D758N0YV-part1 -> ../../sdf1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX11D557YUDV -> ../../sdh
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX11D557YUDV-part1 -> ../../sdh1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX11D55PXTHV -> ../../sdd
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX11D55PXTHV-part1 -> ../../sdd1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55A4939 -> ../../sdg
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55A4939-part1 -> ../../sdg1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55DFK4P -> ../../sdj
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55DFK4P-part1 -> ../../sdj1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55DFLZ4 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WX31D55DFLZ4-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WXA1D65E3TJ9 -> ../../sdl
lrwxrwxrwx 1 root root 10 Jan 21 15:29 ata-WDC_WD60EFRX-68MYMN1_WD-WXA1D65E3TJ9-part1 -> ../../sdl1
lrwxrwxrwx 1 root root  9 Jan 21 15:28 usb-Verbatim_STORE_N_GO_12460000000001D9-0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 21 15:28 usb-Verbatim_STORE_N_GO_12460000000001D9-0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee0596ecc4b -> ../../sdk
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee0596ecc4b-part1 -> ../../sdk1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee0596f1e3c -> ../../sde
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee0596f1e3c-part1 -> ../../sde1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee0596f39f4 -> ../../sdi
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee0596f39f4-part1 -> ../../sdi1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee0596f3b40 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee0596f3b40-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee20c3bba5c -> ../../sdd
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee20c3bba5c-part1 -> ../../sdd1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee20c455c3c -> ../../sdj
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee20c455c3c-part1 -> ../../sdj1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee20c975d80 -> ../../sdl
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee20c975d80-part1 -> ../../sdl1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee26196c7df -> ../../sdc
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee26196c7df-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee2b6ec2587 -> ../../sdg
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee2b6ec2587-part1 -> ../../sdg1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee2b6f065b4 -> ../../sdh
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee2b6f065b4-part1 -> ../../sdh1
lrwxrwxrwx 1 root root  9 Jan 21 15:29 wwn-0x50014ee2b7564f5f -> ../../sdf
lrwxrwxrwx 1 root root 10 Jan 21 15:29 wwn-0x50014ee2b7564f5f-part1 -> ../../sdf1
root@Mandaue:~# 

So if I wanted to pass through /dev/sde (and it wasn't already in use as an array disk) I could use either

 

        /dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WX31D9584LHA

or
        /dev/disk/by-id/wwn-0x50014ee0596f1e3c

 

because both point to ../../sde (i.e. to /dev/sde).
 

 

 

Link to comment
On 1/21/2020 at 9:28 AM, John_M said:

If you type


ls -l /dev/disk/by-id

you will see what the symlinks actually point to. Instead of using /dev/sdX in your configuration, use /dev/disk/by-id/Y where Y is the symlink (shown in light blue/cyan) that points to your /dev/sdX. If what I wrote doesn't make sense then post a screenshot of the ls -l command, above and confirm which sdX you are currently using (from your screenshot above it looks like you're using /dev/sde).

That -l makes all the difference.  That's how to correlate everything.  Beautiful.  I'll update my post.  Thanks.

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.