Hi,
I have a couple of VM's running successfully on my new Proxmox servers, and decided to try migrating one of my old ones from my Ganeti servers. However the partitions are not visible in the VM when I run it.
I've been trying to work out the solution for a couple of weeks now, but cannot find it. I hope it's something simple I'm missing.
Thanks in advance for any help you can provide. =)
Here's the story so far....
INITIAL SETUP STEPS
- Create a VM on Proxmox with a raw disk the same size as the Ganeti one, set to use virtio.
- Backup the VM in Ganeti - I believe this stops the VM, takes a snapshot, then copies the snapshot to a file.
- SCP the backup file to Proxmox
- Replace the blank image with the one I copied from Ganeti.
- Start the VM.
- I get a message in the console: Boot failed: not a bootable disk
LIVE DISK
I booted the VM from an Ubuntu 18.04 live DVD, and opened
Disks. I can see the disk drive (/dev/vda) with correct size, but it's just a blank drive, no partitions (see attached screenshot).
DISK TYPE
I tried changing the disk type from virtio to
IDE and
SCSI in the config file, but that didn't help.
I also tried changing the
SCSI COntroller to different settings, but that didn't help either.
FDISK
If I
fdisk -l the image I get this:
Code:
Disk 102/vm-102-disk-1.raw: 13 GiB, 13958643712 bytes, 27262976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000eb777
Device Boot Start End Sectors Size Id Type
102/vm-102-disk-1.raw1 * 2048 24117247 24115200 11.5G 83 Linux
102/vm-102-disk-1.raw2 24119294 25163775 1044482 510M 5 Extended
102/vm-102-disk-1.raw5 24119296 25163775 1044480 510M 82 Linux swap / Solaris
NOTE: I also tried mounting the first partition of the image and I can see the files in it, so I think the drive image is OK.
I tried creating a VM with a raw disk and actually installing Ubuntu in it to see what was created. When I
fdisk -l that image I get this:
Code:
Disk 150/vm-150-disk-1.raw: 6 GiB, 6442450944 bytes, 12582912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B60B5B2D-D757-4D3C-9E4A-9F7C2BDA0C2A
Device Start End Sectors Size Type
150/vm-150-disk-1.raw1 2048 4095 2048 1M BIOS boot
150/vm-150-disk-1.raw2 4096 11538431 11534336 5.5G Linux filesystem
150/vm-150-disk-1.raw3 11538432 12580863 1042432 509M Linux swap
So the new VM has a
BIOS boot partition, whereas my existing one doesn't, which might affect the booting, but should still be visible.
PARTITION TABLES
I ran
gpart -l on the Ganeti image to check the partition table was OK:
Ganeti image:
Code:
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Disk 102/vm-102-disk-1.raw: 27262976 sectors, 13.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C196314C-9AB7-4667-AD75-A7B4A1332CEC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 27262942
Partitions will be aligned on 2048-sector boundaries
Total free space is 2103229 sectors (1.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 24117247 11.5 GiB 8300 Linux filesystem
5 24119296 25163775 510.0 MiB 8200 Linux swap
So, the Ganeti image appears to be MBR, not GPT, but it's definitely there. As far as I can tell KVM should be OK with MBR, ...it is on the Ganeti servers.
VIRTIO DRIVERS
I confirmed that the
virtio drivers are in the Live disk using this command:
/sbin/lsmod | grep vi
Which gave this output:
Code:
virtio_net 45056 0
virtio_blk 20480 0
...which I read means that the disk and network virtio driver are in use.
I also ran:
cat "/boot/config-`uname -r`" | grep -i vir
Which gave me this:
Code:
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
CONFIG_PARAVIRT_SPINLOCKS=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_PARAVIRT_CLOCK=y
CONFIG_VIRT_TO_BUS=y
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_VSOCKETS_COMMON=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_BLK_SCSI=y
CONFIG_SCSI_VIRTIO=m
CONFIG_VIRTIO_NET=m
CONFIG_CAIF_VIRTIO=m
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
CONFIG_DRM_VIRTIO_GPU=m
# CONFIG_FB_VIRTUAL is not set
CONFIG_SND_SEQ_VIRMIDI=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_VIRTUOSO=m
CONFIG_DMA_VIRTUAL_CHANNELS=m
CONFIG_VFIO_VIRQFD=m
CONFIG_VIRT_DRIVERS=y
CONFIG_VIRTIO=y
# Virtio drivers
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_RPMSG_VIRTIO=m
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_CRYPTO_DEV_VIRTIO=m
CONFIG_VIRTUALIZATION=y
CONFIG_DMA_VIRT_OPS=y
...but I have no idea if that's good or bad.
CONFIG
My VM config is thus:
Code:
boot: cd
bootdisk: virtio0
cores: 2
ide2: ProxmoxVMs:iso/ubuntu-18.04.1-desktop-amd64.iso,media=cdrom,size=1907568K
memory: 2512
name: MinecraftTransfer
net0: virtio=B6:A7:B7:36:58:6C,bridge=vmbr0,tag=3
numa: 0
ostype: l26
smbios1: uuid=ee64500f-fe3a-4950-9008-f72332436622
sockets: 1
unused0: ProxmoxVMs:102/vm-102-disk-2.raw
vga: qxl
virtio0: ProxmoxVMs:102/vm-102-disk-1.raw,size=13G
GANETI INFO FOR VM
Incase it helps here is the output for
gnt-instance info for the VM. I can't find the VM config files on the Ganteti server. =(
Code:
UUID: 7566465d-90a3-4bdc-8efb-3e55e58c626d
Serial number: 43
Creation time: 2018-02-02 16:54:27
Modification time: 2018-10-13 19:48:22
State: configured to be down, actual state is down
Nodes:
- primary: lg1.93.lan
group: default (UUID 403c2ac0-779c-42b3-b3f8-9c2e7e105eb2)
- secondaries: lg3.93.lan (group default, group UUID 403c2ac0-779c-42b3-b3f8-9c2e7e105eb2)
Operating system: noop
Operating system parameters:
Allocated network port: 11000
Hypervisor: kvm
console connection: vnc to 127.0.0.1:11000 (node lg1.93.lan) (display 5100)
Hypervisor parameters:
acpi: default (True)
boot_order: default (disk)
cdrom2_image_path: default ()
cdrom_disk_type: default ()
cdrom_image_path: default ()
cpu_cores: 1
cpu_mask: default (all)
cpu_sockets: default (0)
cpu_threads: default (0)
cpu_type: default ()
disk_aio: default (threads)
disk_cache: default (default)
disk_type: default (paravirtual)
floppy_image_path: default ()
initrd_path: default ()
kernel_args: default (ro)
kernel_path: default ()
keymap: default ()
kvm_extra: default ()
kvm_flag: default ()
kvm_path: default (/usr/bin/kvm)
machine_version: default ()
mem_path: default ()
migration_caps: default ()
migration_downtime: default (30)
nic_type: default (paravirtual)
reboot_behavior: default (reboot)
root_path: default (/dev/vda1)
security_domain: default ()
security_model: default (none)
serial_console: default (True)
serial_speed: default (38400)
soundhw: default ()
spice_bind: default ()
spice_image_compression: default ()
spice_ip_version: default (0)
spice_jpeg_wan_compression: default ()
spice_password_file: default ()
spice_playback_compression: default (True)
spice_streaming_video: default ()
spice_tls_ciphers: default (HIGH:-DES:-3DES:-EXPORT:-DH)
spice_use_tls: default (False)
spice_use_vdagent: default (True)
spice_zlib_glz_wan_compression: default ()
usb_devices: default ()
usb_mouse: default ()
use_chroot: default (False)
use_localtime: default (False)
user_shutdown: default (False)
vga: std
vhost_net: default (False)
virtio_net_queues: default (1)
vnc_bind_address: 127.0.0.1
vnc_password_file: default ()
vnc_tls: default (False)
vnc_x509_path: default ()
vnc_x509_verify: default (False)
vnet_hdr: default (True)
Back-end parameters:
always_failover: default (False)
auto_balance: default (True)
maxmem: 1232
memory: default (1232)
minmem: 1232
spindle_use: default (1)
vcpus: 1
NICs:
- nic/0:
MAC: 00:16:37:2a:cc:e7
IP: None
mode: bridged
link: br1
vlan:
network: None
UUID: b1914b73-6789-4c36-8681-a509e702cf2a
name: None
Disk template: drbd
Disks:
- disk/0: drbd, size 13.0G
access mode: rw
nodeA: lg1.93.lan, minor=12
nodeB: lg3.93.lan, minor=0
port: 11001
name: None
UUID: 49965870-81f4-4b69-9a3c-76606d0792ee
child devices:
- child 0: plain, size 13.0G
logical_id: gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_data
on primary: /dev/gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_data (252:26)
on secondary: /dev/gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_data (252:0)
name: None
UUID: bcdc667f-c5b7-4bb8-9b4b-f26ab46d5677
- child 1: plain, size 128M
logical_id: gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_meta
on primary: /dev/gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_meta (252:27)
on secondary: /dev/gData/a1314bae-70cc-4106-9dfa-43b3b0fd1370.disk0_meta (252:1)
name: None
UUID: eda2b01b-4d75-4543-8fe1-29c7f40b0c08