move vm from hdd to ssd

zierbeek

Explorer
Joined
Apr 4, 2021
Messages
54
Hi all, i have setup a vm a few months ago but only now found out that the VM was installed on the hdd and not on the ssd. I'm not totally sure if this is a big performance problem . But is there a possibility to move it from hdd to ssd?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sure.
1. shut down VM
2. copy the virtual disk image with something like zfs send hdd-pool/some/dataset/vm-image | zfs receive ssd-pool/some/dataset/vm-image
3. zfs destroy ssd-pool/some/dataset/vm-image@---head--- to get rid of the snapshot
4. edit disk device of the VM in the web UI and point it to the new zvol
5. Start VM
6. zfs destroy -r hdd-pool/some/dataset/vm-image if everything works well
 

zierbeek

Explorer
Joined
Apr 4, 2021
Messages
54
Sure.
1. shut down VM
2. copy the virtual disk image with something like zfs send hdd-pool/some/dataset/vm-image | zfs receive ssd-pool/some/dataset/vm-image
3. zfs destroy ssd-pool/some/dataset/vm-image@---head--- to get rid of the snapshot
4. edit disk device of the VM in the web UI and point it to the new zvol
5. Start VM
6. zfs destroy -r hdd-pool/some/dataset/vm-image if everything works well
Thanks Peter, Will write everything down here exactly as you say, just to be sure ;)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Who's Peter? :wink:

You are aware that copying these commands as I wrote them won't work, right?
You need to adapt them to your pool and zvol names.
Which implies you first need to understand what they do and how.

And what do you mean with "write down"? Ever heard of copy & paste? Then edit, of course, then press that large "Enter" key. See above.
 

zierbeek

Explorer
Joined
Apr 4, 2021
Messages
54
Oef haha , i meant Patrick ;)

For sure, i know i need to adapt them, but will edit and ask before i execute haha!
Thats what i meant with writing down ;) not typing every leter ofc, not that retarded :p
 

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
Hello all,

I figured I would jump on this thread rather than create a new

I tried the commands as given be @Patrick M. Hausen but I am clearly getting something wrong

In short I am moving my VM image from my "Apps-VM" pool. The date structure to my VM Image is

Apps-VM/VM-HDD/BackupServer-rdkq6a

I am wanting to move this to me "NVMe-Samsung" pool. The data structure would be

NVMe-Samsung/VM-HDD-Backup/BackupServer-rdkq6a

Here is a screenshot of my structure for better clarity

1658914674722.png


I tried the following command in shell

zfs send apps-vm/vm-hdd/BackupServer-rdkq6a | zfs receive nvme-samsung/vm-hdd-backup/BackupServer-rdkq6a

However I received the following error:

1658914807756.png


Any assistance would be greatly appreciated.

Thanks,
P
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Your pool is named "Apps-VM", not "apps-vm". Likewise for all other path components capitalization is significant. You spelled it correctly in your description, why not in your shell command?
 

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
Your pool is named "Apps-VM", not "apps-vm". Likewise for all other path components capitalization is significant. You spelled it correctly in your description, why not in your shell command?
I am not very familiar with shell and did not realise the capitalization made a difference in this case. I am a heavy Windows user. I made the changes and all went well :)

Many thanks!
 
Top