Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

Looking for Best Practices on LVM Vollumes Shared between Host and Guest

$
0
0
HI!!!!!!!!!!!
I want to create a VirtualBox machine inside my Kubuntu 14.04, it will run Windows 7 64Bits.
The machine will have two drives, Boot (128MB) and C (48GB).
I want the drives to be LVM (Linux Logical Volume Manager) manageable and that both the Host and Guest can access them simultaneously with out causing corruption, even while the VM is running.
I mainly intend to have the Host PC to be in charge of syncing the entire VM to a cloud account and the direct access to the disk is a bonus. I want the cloud service to be able to read the state of every file.

Q1 - I'm open to many suggestions, I will continue to show what I tried and how it failed:

MAP

Host Name = THEHOST
Kubuntu 14.04
Partition Table
_Type = GPT
_Location = sda
sda1 = efi
sda2 = Kubuntu
sda3
_Size = 100Gb
_Format = Unpartitioned
_Flags = lvm
sda4 = swap
LVM:

vgPC1
lvBoot
lvC

Guest Name = PC1

Tried formatting sda3 to ext4 but I am fonder of leaving it unformulated and flagged lvm.

Try1 - Using two LVs and running mkfs from the host. Then give RAW Access to the guess thru:
VBoxManage internalcommands createrawvmdk -filename PC1_Boot.vmdk -rawdisk /dev/vgPC1/lvBoot
VBoxManage internalcommands createrawvmdk -filename PC1_C.vmdk -rawdisk /dev/vgPC1/lvC
Then adding them to the VirtualBox machine.
Result:
The Guest can't see the drives.

Try2 - Using two LVs with RAW access as described in Try1 and using Windows 7's installation partitioning tool.
Result:
When I access and modify anything thru the Host the changes are desynced with what it is made by the Guest, generally requiring to reboot the system to see some or part of the changes.

Try3 - Created one big LV and formatted using W7 Installation.
Result:
To access the internal partitions I have to do extra mappings with kpartx, the mappings can be created on boot but the doc says it would not adapt to lvm changes automatically. Haven't done enough testing about the file sync.


Q2 - Is there a way to use RAW Partition access?
Q3 - Should I use kpartx?, manual says it is insensitive to changes.
Q4 - I'm worried what would happen if I modify the LVs while using RAW Disk access , Would I need to update the VirtualBox Raw access files?
Q5 - Would the same apply (Q4) if using RAW Partition access?

Thanks for your Time.

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>