Skip to contentSkip to conversation

More vcd info wanted

DISCUSSION Bill Davidsen 4 participants 5 messages Mar 30, 2009 KVM

lore
Share & tools
lore
#0 lore raw

I am looking for detailed information or a single reproducible example of starting a VM using the qemu-kvm command from a script under Linux (and a display script on a control host, obviously). What software needs to be installed and running on the host, and what needs to be on the remote accessing display.

Please: this is not a question about doing something else using some other method, I need to be able to drop a disk image and a few parameters into a KVM host and start it in such a way that there is not human intervention nor previous preparation such as virt-manager or similar.

I run desktops and servers under KVM using both command line start and managers, I just keep running into documentation which tells me to use a "vnc specifier" without explanation of what that might look like or a single reproducible example of same.

The host will be given a disk image and some parameters such as MAC address and memory size, and the machine which will have the display. That's my starting point, KVM host info will be used to start the viewer on another machine.

Signature · 3 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
#1 lore raw
Quoted 11 lines · Bill Davidsen

I am looking for detailed information or a single reproducible example of starting a VM using the qemu-kvm command from a script under Linux (and a display script on a control host, obviously). What software needs to be installed and running on the host, and what needs to be on the remote accessing display.

Please: this is not a question about doing something else using some other method, I need to be able to drop a disk image and a few parameters into a KVM host and start it in such a way that there is not human intervention nor previous preparation such as virt-manager or similar.

Quoted 4 lines

I run desktops and servers under KVM using both command line start and managers, I just keep running into documentation which tells me to use a "vnc specifier" without explanation of what that might look like or a single reproducible example of same.

-vnc localhost:1 -- will display the guest VGA display on the localhost. A remote system can do:

vncviewer ${kvmhost}:1

to view the guest VGA.

Quoted 14 lines

The host will be given a disk image and some parameters such as MAC address and memory size, and the machine which will have the display. That's my starting point, KVM host info will be used to start the viewer on another machine.

Signature · 7 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]
#2 lore raw
Quoted 5 lines · Ryan Harper
Quoted 4 lines · Bill Davidsen

I am looking for detailed information or a single reproducible example of starting a VM using the qemu-kvm command from a script under Linux (and a display script on a control host, obviously). What software needs to be installed and running on the host, and what needs to be on the remote accessing display.

Please: this is not a question about doing something else using some other method, I need to be able to drop a disk image and a few parameters into a KVM host and start it in such a way that there is not human intervention nor previous preparation such as virt-manager or similar.

Quoted 9 lines
Quoted 1 line

I run desktops and servers under KVM using both command line start and managers, I just keep running into documentation which tells me to use a "vnc specifier" without explanation of what that might look like or a single reproducible example of same.

-vnc localhost:1 -- will display the guest VGA display on the localhost. A remote system can do:

vncviewer ${kvmhost}:1

to view the guest VGA.

Thanks, will try later tonight. Have to have a bit of care getting the number right (unique) since there might be more than one of these, but this may be all I need.

Quoted 2 lines
Quoted 2 lines

The host will be given a disk image and some parameters such as MAC address and memory size, and the machine which will have the display. That's my starting point, KVM host info will be used to start the viewer on another machine.

Signature · 3 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
#4 lore raw
In reply to Ryan Harper
Quoted 6 lines · Ryan Harper
Quoted 4 lines · Bill Davidsen

I am looking for detailed information or a single reproducible example of starting a VM using the qemu-kvm command from a script under Linux (and a display script on a control host, obviously). What software needs to be installed and running on the host, and what needs to be on the remote accessing display.

Please: this is not a question about doing something else using some other method, I need to be able to drop a disk image and a few parameters into a KVM host and start it in such a way that there is not human intervention nor previous preparation such as virt-manager or similar.

Quoted 8 lines
Quoted 2 lines

I run desktops and servers under KVM using both command line start and managers, I just keep running into documentation which tells me to use a "vnc specifier" without explanation of what that might look like or a single reproducible example of same.

-vnc localhost:1 -- will display the guest VGA display on the localhost. A remote system can do:

vncviewer ${kvmhost}:1

If you say -vnc localhost:1, then vncviewer ${kvmhost}:1 will certainly not work.

You have to say -vnc :1, then vncviewer ${kvmhost}:1.

And happiness will ensue by s/vncviewer/vinagre/.

Regards,

Anthony Liguori

#3 lore raw
In reply to Bill Davidsen
Quoted 8 lines · Bill Davidsen
Quoted 6 lines · Ryan Harper

-vnc localhost:1 -- will display the guest VGA display on the localhost. A remote system can do:

vncviewer ${kvmhost}:1
to view the guest VGA.

Thanks, will try later tonight. Have to have a bit of care getting the number right (unique) since there might be more than one of these, but this may be all I need.

You might consider using libvirt, which (among many other relevant features) can dynamically assign VNC ports (thus managing the uniqueness constraint) and will expose the currently selected port as part of the domain's XML configuration. (Getting a VNC viewer going with libvirt is considerably easier than that, though -- "virt-viewer VM_NAME" will do the trick).