diff options
author | Josh Kearney <josh@jk0.org> | 2011-11-01 12:00:56 -0500 |
---|---|---|
committer | Josh Kearney <josh@jk0.org> | 2011-11-01 12:39:37 -0500 |
commit | a506c89c281e5081146b9280d378faef033c4452 (patch) | |
tree | d3279ba594a996e6c7756938073ea20bd78cb241 | |
parent | 44f9f331fe75ee2facc2be995632cdf20f319380 (diff) | |
download | nova-a506c89c281e5081146b9280d378faef033c4452.tar.gz nova-a506c89c281e5081146b9280d378faef033c4452.tar.xz nova-a506c89c281e5081146b9280d378faef033c4452.zip |
Use fat32 for Windows, linux-swap for Linux swap partitions.
Change-Id: I06d7c67290ffb5ba957306306c2838355c36946f
-rw-r--r-- | nova/virt/xenapi/vm_utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 7142d0457..012717aa7 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -507,6 +507,12 @@ w # 2. Attach VDI to compute worker (VBD hotplug) with vdi_attached_here(session, vdi_ref, read_only=False) as dev: # 3. Create swap partition + + # NOTE(jk0): We use a FAT32 filesystem for the Windows swap + # partition because that is what parted supports. + is_windows = instance.os_type == "windows" + fs_type = "fat32" if is_windows else "linux-swap" + dev_path = utils.make_dev_path(dev) utils.execute('parted', '--script', dev_path, 'mklabel', 'msdos', run_as_root=True) @@ -514,7 +520,7 @@ w partition_start = 0 partition_end = swap_mb utils.execute('parted', '--script', dev_path, 'mkpartfs', - 'primary', 'linux-swap', + 'primary', fs_type, str(partition_start), str(partition_end), run_as_root=True) |