Learning how to build things

I continue my exploration of how to build the components around Spice.

Reusing old VMware images

I tried to connect an old VMware image directly in a VM. I just passed the path to the .vmdk file directly. This does not seem to work well: the VM tells me there is no bootable disk.

So I followed these instructions to attempt and convert the original VMware image to QCow2 format. The command is simple:

% ./qemu-img convert /path/to/disk.vmdk /path/to/other-disk.qcow2

But then the guest does not boot: Error loading operating system. Tried various things. Double-checked that the same disk started correctly in VMware.

Booting VM from physical disk

I want to boot Ubuntu 14.04 from the physical disk, so that I can recover the Tao3D build environment that lives there. So the question is how to boot a whole disk with KVM.

This page sent me astray, making it sound as if it was easy to do with the virt-manager user interface. So I tried several times to add the disk using the storage pool “disk” interface. Interestingly, I had several cases where the disk storage pool, after some failure, would not show up in the list before a restart of virt-manager.

But after a lot of experimentation, it seems that the user interface for adding disks can only build pools of partitions. For example, my /dev/sda disk shows up as the individual partitions, i.e. /dev/sda1 through /dev/sda5. The interface does not make it easy to add a whole disk /dev/sda as a raw device. Instead, I can only add the individual partitions, but not in a way that would allow the boot and root partition to show up in the same way they do in a physical system (i.e. under the same disk controller).

The solution came from this post. The post correctly points out that, at the moment, it cannot be done without editing the configuration file by hand. In my case, I used:

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sda'/>
      <target dev='vdb' bus='virtio'/>

That works, but the guest only boots in text mode. Apparently, Ubuntu 14.04 has some old QXL graphic driver that does not work too well (only half of the screen has the Ubuntu background color) :

Screen Shot 2017-02-06 at 18.55.52.png

Updated the guest driver using apt-get, but then when I login, there is an error and I get back to the login screen immediately.

A VMVGA driver or Cirrus driver does not seem to allow boot to proceed further. With Cirrus, I see some text in yellow, but then nothing. With VMVGA, I end up with a text-only boot. Booting in VGA mode



Author: Christophe de Dinechin

I try to change the world, but that's work in progress. If you want to know me, google "Christophe de Dinechin". Keywords: concept programming, virtualization, OS design, programming languages, video games, 3D, modern physics. Some stuff I did that I'm proud of: the first "true" 3D game for the PC, HP's big iron virtualization, real-time test systems for car electronics, some of the best games for the HP48 calculator, a theory of physics that makes sense (at least to me).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s