How to access physical hdd from fully virtualized machine

TimeRider

New Member
Jul 23, 2009
4
0
1
I have installed Debian via ISO as a fully virtualized machine, I've now added a second harddrive to the system (/dev/sdbx which would usually mount as /var/www) and would like access it as a standard physical hdd from the virtualised machine.

I've seen some mention of this on the forum when using openvz container installed os, but not for fully virtualized, the openvz way doesn't work in this instance. Maybe I'm just missing something obvious? A howto would be nice :)

And a big thanks for proxmox, it's looking good, and does some amazing stuff straight out of the box :) Dunno why it took me so long to discover it!

Thanks
Steve!
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,251
810
163
I have installed Debian via ISO as a fully virtualized machine, I've now added a second harddrive to the system (/dev/sdbx which would usually mount as /var/www) and would like access it as a standard physical hdd from the virtualised machine.

I've seen some mention of this on the forum when using openvz container installed os, but not for fully virtualized, the openvz way doesn't work in this instance. Maybe I'm just missing something obvious? A howto would be nice :)

And a big thanks for proxmox, it's looking good, and does some amazing stuff straight out of the box :) Dunno why it took me so long to discover it!

Thanks
Steve!

see qm (type 'man qm').

edit manually your config file:

Code:
nano /etc/qemu-server/VMID.conf

after you changed the file, make sure you poweroff and start the VM.
 

TimeRider

New Member
Jul 23, 2009
4
0
1
Re: How to access physical hdd from fully virtualized machine (solved)

Thanks for the quick reply, I'd read elsewhere of support being excellent here - I can now agree, a straight to the point reply, that answered my question and got the job done :)

The solution was as you suggested in the /etc/qemu-server/vmid.conf files, and was VERY simple to implement and works as long as a power off of the vm takes place.

I'm documenting this simple process - simply because I could find no info about it previously: My vm boots from the qcow2 file below, and do add the second harddrive it was as simple, as is shown in the second line below :)

scsi0: vm-102-disk.qcow2
scsi1: /dev/sdb

Obviously if using IDE devices then the above should change appropriately.

After a reboot, /dev/sd* automatically shows the device/partitions just as you'd expect on a non virtualized environment, so no messing with makedev etc.

I would be nice to see this in the gui :)

Searching the forum for qemu-server yielded http://www.proxmox.com/forum/showthread.php?p=8104 which also helped some :)

Proxmox just seems to keep yielding answers, prebuilt in, Keep at it you guys, a truly excellent job!

Thanks

Steve!
www.timerider.co.uk
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,251
810
163
Re: How to access physical hdd from fully virtualized machine (solved)

I would be nice to see this in the gui :)

New GUI for advanced storage pools is more or less finished, you can expect beta version earliest in August - very exiting and brings Proxmox VE to the next level.
 

vmsv

New Member
Aug 7, 2009
20
0
1
Where did you seen the metion to the use of physical hdd by openvz machines ? I want to do just that but can't find a way to do it.
 

pq_rar

New Member
Aug 13, 2009
17
0
1
Ooo....just waiting for that as it is a pain in the a** to resize an image. Any estimation when will be available?
Thanks.
E
 

vlx

New Member
Jul 28, 2009
14
0
1
Re: How to access physical hdd from fully virtualized machine (solved)

New GUI for advanced storage pools is more or less finished, you can expect beta version earliest in August - very exiting and brings Proxmox VE to the next level.

Hi!

I'm wondering when the Proxmox 2.0 will come out. Any time soon? Storage features (FC and iSCSI) are essential for our decision to use it in production enviroment.
 

pq_rar

New Member
Aug 13, 2009
17
0
1
I have an issue:
I installed windows 2003 on a 50 Gb virtualized hdd and now I have 13 Tb(RAID 6) hdd that I split it in 3 partitions. One is ntfs and I add it to the Windows 2003 machine(/dev/sda3) but in Windows I am able to see 270.49Gb instead of more than 4Tb(4366.49064302444GB in Proxmox). If I simulte an installation of Windows 2003 on the same machine at the partitioning the hdd step I see the same amount(270.49Gb).
Do you have an idea what I am doing wrong?
Thanks,
pq
 
Last edited:

vmsv

New Member
Aug 7, 2009
20
0
1
Can you post the configuration file for your VM,and the Fdisk output for the disk you are partitioning ?
 

pq_rar

New Member
Aug 13, 2009
17
0
1
name: Windows2003
smp: 1
vlanu: rtl8139=D6:0A:F8.....
bootdisk: ide0
ide0: vm-101-disk-1.qcow2
ide1: cdrom,media=cdrom
ide2: /dev/sda3
ostype: w2k3
memory: 1500
onboot: 0
boot: dc
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1

virt13:~# fdisk /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

So if I have a 13Tb how I should partition that space? I should use parted? I would like to have 4Tb in Windows 2003.
Thanks for your help.
PQ
 

pq_rar

New Member
Aug 13, 2009
17
0
1
Also I delete all the partitions and make them unformatted
So in parted:
(parted) print /dev/sda
Model: AMCC 9650SE-16M DISK (scsi)
Disk /dev/sda: 14.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 4656GB 4656GB
2 4656GB 9311GB 4656GB
3 9311GB 14.0TB 4688GB
 

pq_rar

New Member
Aug 13, 2009
17
0
1
Ok...I have no idea what is wrong with this.
If I boot and simulate a fresh install of windows or linux, the size of the second drive is:
Windows XP 32 bit - 270Gb
Windows XP 64 bits - 270Gb
Windows 2003 32bits - 270Gb
Ubuntu 9.04 Desk 64 bits - 4.7Tb
Ubuntu 8.04 Serv 32(I guess) - 4.7Tb
....stupid Windows
I used parted and the partitions looks fine.
I don't know what else to try.
Thanks to everybody for help.
pq
 

pq_rar

New Member
Aug 13, 2009
17
0
1
there is no difference...still wired size. I resized at 3.18Tb and now it is showing in Proxmox 3259.62899541855GB(right size), but in Windows shows:
Disk 1 Basic 1798.53 Online
...and 4 partitions on it:
1 - 3.13Gb unallocated
2 - 914.40Gb Unknown partition
3 - 13.74Gb unallocated
4 - 867.17Gb unknown partition
....I have no clue from where this 4 partitions are coming.
...and again is a wrong size.


...but is working fine if I resize under 2Tb and Windows recognize the right size. Anybody knows how to fix this? ...probably I will add another partition of 1.99Tb so will be fine.
pq
 

pq_rar

New Member
Aug 13, 2009
17
0
1
One mmore thing:
-if I want to use /dev/sda1 in a virtualized Windows 2003
a) I should format sda1 in ntfs format in Debian(where Proxmox is installed)
b) I should leave it unformatted and format in ntfs under Windows
a) or b) ?

Also I will be able to see what is on the sda1 from Debian(if I will copy something on that partition in Windows)?
Thanks,
pq
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,251
810
163
One mmore thing:
-if I want to use /dev/sda1 in a virtualized Windows 2003
a) I should format sda1 in ntfs format in Debian(where Proxmox is installed)
b) I should leave it unformatted and format in ntfs under Windows
a) or b) ?

Also I will be able to see what is on the sda1 from Debian(if I will copy something on that partition in Windows)?
Thanks,
pq

just dev/sda1 (see man qm) and format in under windows with ntfs. Mounting devices from two different systems is not really recommended, ntfs does not support this.
 

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 your own in 60 seconds.

Buy now!