Azitech

Azimout's Linux weblog

Upgrade server vm using iso on host

leave a comment »

I use a couple of instances of Ubuntu Server under KVM/Qemu for testing and learning stuff. I wanted to upgrade them to 11.04, but avoid downloading all those packages over and over again. Here’s how to add the .iso file on the KVM host to the guest’s repositories:

  1. mount the host’s directory containing the .iso, like this: sudo sshfs username@kvm-host:/path/to/folder/containing/iso /local/mount/point -o allow_other
  2. mount the .iso to /media/cdrom (a different location won’t work) , like this: sudo mount -o loop /local/mount/point/ubuntu-11.04-server-amd64.iso /media/cdrom
  3. add that folder to the repositories: sudo apt-cdrom -m -d=/media/cdrom add

Note: even though at first it will acknowledge the .iso’s existence, later it will ask you to “please insert the disc labeled blah blah blah”. So keep another ssh terminal open, you’ll need to mount the .iso once more.

Advertisements

Written by azimout

14/05/2011 at 21:47

Posted in Howto

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

%d bloggers like this: