add a physical drive as a drive in virtual machine

php437

New Member
Jul 4, 2011
2
0
1
hi.
I have installing proxmox 1.8. and I have created a virtual machine based on kvm.
I am need to add a physical drive (/dev/sdb1 mount as /mnt/sdb1 in proxmox parent OS) as a drive for virtual machine.
It is possible? thx
 
edit /etc/qemu-server/VMID.conf -> add line new line

virtioX: /dev/sdb1 or ideX: /dev/sdb1 or scsiX: /dev/sdb1

Is this confirmed as working/good practice? If yes, it should go to the wiki (I would do so :eek:)!
Regards, Holger
 
edit /etc/qemu-server/VMID.conf -> add line new line

virtioX: /dev/sdb1 or ideX: /dev/sdb1 or scsiX: /dev/sdb1
1)
No need to edit it manually.
Just use the "qm set" command.
The manpage of qm is your friend ;)

2)
you can pass on a partition (like /dev/sda1, which inside the vm would be treated as a whole disk)
or you can pass a whole disk (like /dev/sda). The VM inside would then see the already existing partition(s) as well

The example from above would read like this: "# qm set <vmid> -virtio<X> /dev/sda" for a whole disk, using virtio-bock drivers.
 
Last edited:
What about backup of physical disk?

This seems to be an attractive option for some scenarios which do not involve migrating.
How is vzdump behaving? Will it dump the disk? Can the disk be excluded the usual way?

Regards, Holger
 
Re: What about backup of physical disk?

thx guys
i am make `qm set 101 --scsi8 /dev/sdc1'
& now I am feeling happy

p.s. sorry, my english is not very pure
 

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!