How to move disk another machine

abrasum

New Member
Apr 11, 2017
4
0
1
41
Hello.

I'm using proxmox lastest version.
I'm using the LVM storage in proxmox.
Code:
# cat /etc/pve/storage.cfg
lvm: local-safe
        vgname vg-safe
        content images,rootdir
        shared 0

dir: iso-backups
        path /srv/iso-backups
        content vztmpl,iso,backup
        maxfiles 5
        shared 0

dir: local
        disable
        path /var/lib/vz
        content vztmpl
        maxfiles 0
        shared 0
I created a KVM machine and added into its 2 disks VirtIO.
How I can delete the virtual machine without deleting second disk?
I want to create a new machine and add a saved disk from the first machine.
 
you can't - disks are associated with one guest. you can either create the new machine in place (delete the disk you don't want to keep, add a new disk, and install your guest operating system). if you want to change the VM ID, you can either use backup/restore or full clone and delete the source afterwards.
 
  • Like
Reactions: abrasum
you can't - disks are associated with one guest. you can either create the new machine in place (delete the disk you don't want to keep, add a new disk, and install your guest operating system). if you want to change the VM ID, you can either use backup/restore or full clone and delete the source afterwards.
thank you very much!
I will try your method now!
 
Although, I have another situation.
So, I have two KVM machine. Can I to move a disk firsts machine to second machine?
 
Although, I have another situation.
So, I have two KVM machine. Can I to move a disk firsts machine to second machine?

not without manually editing config files and renaming disks, which should only be done if you really know and understand what you are doing.
 
Since Proxmox 1.x I had often "played" with the .conf file editing it as I need.
I could clone a VM simply copying and modifying the .conf file
I can move/copy disk images if needed.
I understand that this can easily leads to mistakes, but it is really pratical for simple servers management
Proxmox is great in this: changes in conf file are immediatly available in gui. A good 2-way tool like webmin for managing servers.
With LVM-Thin things seems a bit more complex, but we can still manage it.
Am I using a so really bad approach?

Thanks, P.
 
Well, I will describe in detail.
This is config-file first machine:
Code:
root@vmserversql:~# cat /etc/pve/qemu-server/108.conf
bootdisk: virtio0
cores: 1
ide2: iso-backups:iso/openSUSE-Leap-42.2-DVD-x86_64.iso,media=cdrom
memory: 1024
name: machine-test-clone
net0: virtio=2A:CF:22:41:88:F4,bridge=vmbr0
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=f4b8cd6c-dc8d-4ea6-b2f4-8ea68cbcd120
sockets: 1
virtio0: local-safe:vm-108-disk-1,size=12G
virtio1: local-safe:vm-108-disk-2,size=10G

I

I want to move drive virtio1: local-safe:vm-108-disk-2,size=10G to the second machine.
If I add this line to the configuration file of the second machine and remove it from configuration file first machine, will be enough? If I that delete first machine, this drive will remain?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!